<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>freemarker模板引擎</title>
</head>
<body>
<table border="1px" cellpadding="10px" cellspacing="0" style="align-content: center">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>电话</th>
    </tr>
    <#list users as user>

        <#if user.id % 2 == 0>
            <tr style="background-color:#bb44bb;">
                <td>${user.id}</td>
                <td>${user.username}</td>
                <td>${user.tel}</td>
            </tr>
        <#else>
            <tr style="background-color:#ccc;">
                <td>${user.getId()}</td>
                <td>${user.getUsername()}</td>
                <td>${user.getTel()}</td>
            </tr>
        </#if>

    </#list>
</table>
</body>
</html>